package file;

import java.io.File;

public class Demo1 {

	public static void main(String[] args) {
		File f=new File("e:\\aa");
		//System.out.println(f.isDirectory());
		showFile(f);

	}
	private static void showFile(File f) {
		if(f.isFile()){
			System.out.println(f.getPath());
		}
		else{
			System.out.println(f.getPath());
			File[] fs=f.listFiles();
			for (File file : fs) {
				/*if(file.isDirectory()){
					showFile(file);
					
				}*/
				if(!file.isFile()){
					showFile(file);
				}
				else{
					System.out.println(file.getPath());
				}
				
			}
			//System.out.println(f.getPath());
		}
	}

		
		
	}


